-- GENERATED SPELL FOR [Winterskorn Rune-Seer] --


function spell0_23667(pUnit, Event) --@Freezing Circle,n/a--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(34787,pUnit:GetMainTank ())
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_23667', 1, 1)
end

function spell1_23667(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(43083,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23667', 6000, 1)
end

function spell2_23667(pUnit, Event) --@Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(11986,pUnit)
pUnit:RegisterEvent('Sorts_23667', 3000, 1)
end

function spell3_23667(pUnit, Event) --@Rune Ward,Self--
pUnit:FullCastSpellOnTarget(43453,pUnit)
pUnit:RegisterEvent('Sorts_23667', 8291, 1)
end

function Sorts_23667(pUnit, Event)
local choix_sorts_23667 = math.random(0, 3)
if choix_sorts_23667 == 0 then
pUnit:RegisterEvent('spell0_23667', 1, 1)
end
if choix_sorts_23667 == 1 then
pUnit:RegisterEvent('spell1_23667', 1, 1)
end
if choix_sorts_23667 == 2 then
pUnit:RegisterEvent('spell2_23667', 1, 1)
end
if choix_sorts_23667 == 3 then
pUnit:RegisterEvent('spell3_23667', 1, 1)
end
end

function mob23667_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23667', math.random(1500, 3000), 1)
end

function mob23667_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23667_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23667_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23667, 1, 'mob23667_Action')
RegisterUnitEvent(23667, 2, 'mob23667_Leave')
RegisterUnitEvent(23667, 3, 'mob23667_Kill')
RegisterUnitEvent(23667, 4, 'mob23667_Die')
